
package com.ryan.notify.ad.model;

import java.util.ArrayList;

public class AdResult {

    private boolean ad ;
    private String pkg;
    private ArrayList<String> adName;
    private ArrayList<String> extraInfo;

    public AdResult(String pkg){
        this.ad = false;
        this.pkg = pkg;
        this.adName = new ArrayList<String>();
        this.extraInfo = new ArrayList<String>();
    }
    
    /**
     * @return the pkg
     */
    public String getPkg() {
        return pkg;
    }

    /**
     * @param pkg the pkg to set
     */
    public void setPkg(String pkg) {
        this.pkg = pkg;
    }

    /**
     * @return the ad
     */
    public boolean isAd() {
        return ad;
    }

    /**
     * @param ad the ad to set
     */
    public void setAd(boolean ad) {
        this.ad = ad;
    }

    /**
     * @return the adName
     */
    public ArrayList<String> getAdName() {
        return adName;
    }
    
    public String getAdNameString(){
        ArrayList<String> list = getAdName();
        if(list==null||list.size()==0)
            return"";
        String ad = "";
        for (String str : list) {
            ad+=str+",";
        }
        return ad.substring(0,ad.length()-1);
    }

    /**
     * @param adName the adName to set
     */
    public void setAdName(String adName) {
        this.adName.add(adName);
    }

    /**
     * @return the extraInfo
     */
    public ArrayList<String> getExtraInfo() {
        return extraInfo;
    }

    /**
     * @param extraInfo the extraInfo to set
     */
    public void setExtraInfo(String extraInfo) {
        this.extraInfo .add(extraInfo);
    }


}
